package cn.com.wms.model;

import java.util.Date;

import org.hibernate.internal.util.StringHelper;

import cn.com.wms.Base.LogConstants;


public class SysLogBean extends BaseModel {
	private String companyType;//公司类型
	
	/**
	 * 修改表
	 */
	private String logTable;
	
//	private String logTableImpl;
	
	/**
	 * 修改日期
	 */
	private Date logDate;

	/**
	 * 修改人
	 */
	private String opUser;
	
	private EmployBean employBean=new EmployBean();

	/**
	 * 修改原因
	 */
	private String opReason;
	
	/**
	 * 日志备注
	 */
	private String logRemark;
	
	/**
	 * 修改类型
	 */
	private String logType;
	
//	private String logTypeImpl;
	
	/**
	 * 修改前数据 
	 */
	private String beforeData;
	
//	private String beforeDataImpl;
	
	/**
	 * 修改后数据
	 */
	private String afterData;
	
	private String commondId;
	private String tableId;
	private String verificationName;
	private String verificationPer;
	private Date verificationDate;
	private String verificationDescription;
	private String auditName;
	private String auditPer;
	private Date auditDate;
	private String auditDescription;
	private String opUserName;
	private String isFinish;
	private String orderId;
	private String bgColor;
//	private String afterDataImpl;
	
	private String opReasonItem;
	
	//lizhenzhen2016.07.12增加注册码
	private String serialNumber;
	
	public String getSerialNumber() {
		return serialNumber;
	}

	public void setSerialNumber(String serialNumber) {
		this.serialNumber = serialNumber;
	}
	
	//end

	public String getOpReasonItem() {
		return opReasonItem;
	}

	public void setOpReasonItem(String opReasonItem) {
		this.opReasonItem = opReasonItem;
	}

	public String getLogTable() {
		return logTable;
	}

	public void setLogTable(String logTable) {
		this.logTable = logTable;
	}

	public Date getLogDate() {
		return logDate;
	}

	public void setLogDate(Date logDate) {
		this.logDate = logDate;
	}

	public String getOpUser() {
		return opUser;
	}

	public void setOpUser(String opUser) {
		this.opUser = opUser;
	}

	public String getOpReason() {
		return opReason;
	}

	public void setOpReason(String opReason) {
		this.opReason = opReason;
	}

	public String getLogRemark() {
		return logRemark;
	}

	public void setLogRemark(String logRemark) {
		this.logRemark = logRemark;
	}

	public String getLogType() {
		return logType;
	}

	public void setLogType(String logType) {
		this.logType = logType;
	}

	public String getBeforeData() {
		return beforeData;
	}

	public void setBeforeData(String beforeData) {
		this.beforeData = beforeData;
	}

	public String getAfterData() {
		return afterData;
	}

	public void setAfterData(String afterData) {
		this.afterData = afterData;
	}

	public String getLogTableImpl() {
		if(StringHelper.isNotEmpty(logTable)) {
			return LogConstants.logTableMap.get(logTable);
		}
		return "";
	}


	public String getLogTypeImpl() {
		if(StringHelper.isNotEmpty(logType)) {
			return LogConstants.logTypeMap.get(logType);
		}
		return "";
	}

	public String getBeforeDataImpl() {
		if(LogConstants.LOG_SAVE.equals(logType)) {
			return "无";
		}
		return beforeData;
	}


	public String getAfterDataImpl() {
		if(LogConstants.LOG_DELETE.equals(logType)) {
			return "无";
		}
		return afterData;
	}

	public EmployBean getEmployBean() {
		return employBean;
	}

	public void setEmployBean(EmployBean employBean) {
		this.employBean = employBean;
	}

	public String getCommondId() {
		return commondId;
	}

	public void setCommondId(String commondId) {
		this.commondId = commondId;
	}

	public String getTableId() {
		return tableId;
	}

	public void setTableId(String tableId) {
		this.tableId = tableId;
	}

	public String getCompanyType() {
		return companyType;
	}

	public void setCompanyType(String companyType) {
		this.companyType = companyType;
	}

	public String getVerificationName() {
		return verificationName;
	}

	public void setVerificationName(String verificationName) {
		this.verificationName = verificationName;
	}

	public String getVerificationPer() {
		return verificationPer;
	}

	public void setVerificationPer(String verificationPer) {
		this.verificationPer = verificationPer;
	}

	public Date getVerificationDate() {
		return verificationDate;
	}

	public void setVerificationDate(Date verificationDate) {
		this.verificationDate = verificationDate;
	}

	public String getAuditName() {
		return auditName;
	}

	public void setAuditName(String auditName) {
		this.auditName = auditName;
	}

	public String getAuditPer() {
		return auditPer;
	}

	public void setAuditPer(String auditPer) {
		this.auditPer = auditPer;
	}

	public Date getAuditDate() {
		return auditDate;
	}

	public void setAuditDate(Date auditDate) {
		this.auditDate = auditDate;
	}

	public String getVerificationDescription() {
		return verificationDescription;
	}

	public void setVerificationDescription(String verificationDescription) {
		this.verificationDescription = verificationDescription;
	}

	public String getAuditDescription() {
		return auditDescription;
	}

	public void setAuditDescription(String auditDescription) {
		this.auditDescription = auditDescription;
	}

	public String getOpUserName() {
		return opUserName;
	}

	public void setOpUserName(String opUserName) {
		this.opUserName = opUserName;
	}

	public String getIsFinish() {
		return isFinish;
	}

	public void setIsFinish(String isFinish) {
		this.isFinish = isFinish;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getBgColor() {
		if(StringHelper.isNotEmpty(auditPer)){
			bgColor="";
		}else if(StringHelper.isNotEmpty(verificationPer)){
			bgColor="#FFFF00";
		}else{
			bgColor="#FF0000";
		}
		return bgColor;
	}

	public void setBgColor(String bgColor) {
		this.bgColor = bgColor;
	}




}
